﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.pp.processor.type.comm;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.pp.stmtformatter.type.comm
{
	// Token: 0x02000207 RID: 519
	public class DeleteStmtFormatter : AbstractStmtFormatter
	{
		// Token: 0x06001211 RID: 4625 RVA: 0x00317C84 File Offset: 0x00315E84
		public virtual void addWhereClauseProcessor(AbstractProcessor p)
		{
			if (this.whereClauseProcessors == null)
			{
				this.whereClauseProcessors = new List<AbstractProcessor>();
			}
			this.whereClauseProcessors.Add(p);
		}

		// Token: 0x06001212 RID: 4626 RVA: 0x00317CA8 File Offset: 0x00315EA8
		protected internal override void doFormat(TCustomSqlStatement stmtArg)
		{
			TDeleteSqlStatement tdeleteSqlStatement = stmtArg as TDeleteSqlStatement;
			this.runProcessor<TDeleteSqlStatement>(this.SpecialProcessors, tdeleteSqlStatement);
			if (tdeleteSqlStatement.WhereClause != null)
			{
				this.runProcessor<TExpression>(this.whereClauseProcessors, tdeleteSqlStatement.WhereClause.Condition);
				this.runProcessor<TExpression>(this.ExpressionProcessors, tdeleteSqlStatement.WhereClause.Condition);
			}
		}

		// Token: 0x040013DA RID: 5082
		private IList<AbstractProcessor> whereClauseProcessors;
	}
}
